<template>
  <section>
    <el-form label-width="80px">
      <el-form-item label="属性名">
        <el-input size="mini" v-model="keyName"></el-input>
      </el-form-item>
      <el-form-item label="属性值">
        <el-select v-model="selType" size="mini">
          <el-option v-for="(type,index) in typeList" :key="index" :value="type.code" :label="type.name"></el-option>
        </el-select>
      </el-form-item>
    </el-form>
  </section>
</template>

<script>
  import errHandler from '@/assets/errHandler.js'
  import {mapGetters, mapActions, mapMutations} from 'vuex'
  import Vue from 'vue'//后续添加属性，需要vue联动
  export default {
    name: "clientProps",
    props:['clientProps'],
    data(){
      return{
        keyName:null,
        typeList:[
          {name:'树形目录',code:'tree'},
          {name:'字符串',code:'string'}
        ],
        selType:null
      }
    },
    watch:{
      selType(nv,ov){
        if(nv) this.getModel()
      }
    },
    created() {
      console.log('看看当前属性-----------',this.clientProps)
      for(let key in this.clientProps){
        this.keyName=key
      }
    },
    mounted() {
    },
    computed: {
      ...mapGetters(['department']),
    },
    methods:{
      getModel(){

      }
    }
  }
</script>

<style scoped>

</style>
